-- GENERATED SPELL FOR [Alystros the Verdant Keeper] --


function spell0_27249(pUnit, Event) --@Lapsing Dream,n/a--
pUnit:FullCastSpellOnTarget(51922,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27249', 15000, 1)
end

function spell1_27249(pUnit, Event) --@Talon Strike,n/a--
pUnit:FullCastSpellOnTarget(51937,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27249', 551, 1)
end

function spell2_27249(pUnit, Event) --@Wing Beat,n/a--
pUnit:FullCastSpellOnTarget(51938,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27249', 8314, 1)
end

function Sorts_27249(pUnit, Event)
local choix_sorts_27249 = math.random(0, 2)
if choix_sorts_27249 == 0 then
pUnit:RegisterEvent('spell0_27249', 1, 1)
end
if choix_sorts_27249 == 1 then
pUnit:RegisterEvent('spell1_27249', 1, 1)
end
if choix_sorts_27249 == 2 then
pUnit:RegisterEvent('spell2_27249', 1, 1)
end
end

function mob27249_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27249', math.random(1500, 3000), 1)
end

function mob27249_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27249_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27249_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27249, 1, 'mob27249_Action')
RegisterUnitEvent(27249, 2, 'mob27249_Leave')
RegisterUnitEvent(27249, 3, 'mob27249_Kill')
RegisterUnitEvent(27249, 4, 'mob27249_Die')
